<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-title" content="Your title">
	<meta name="format-detection" content="telephone=no">
	<title>海棠金融四季度投资策略发布会</title>
	<link rel="stylesheet" href="css/show.css">
</head>
<body class="live">
	<div class="container">
		<h5>更新验证码：length：长度，num：数量，passwd：密码，status：是否强制更新（1是，0否）
			<br>
			http://api.ch-jht.com/live/index/insertCode?length=8&num=12&passwd=&status=
		</h5>
		<h5>清除访问记录: http://api.ch-jht.com/live/index/updateCount
		</h5>
		<table class="table" v-cloak>
			<thead>
				<tr>
					<th></th>
					<th>部门</th>
					<th>授权码</th>
					<th>观看次数</th>
				</tr>
			</thead>
			<tbody>
				<tr v-for="data in datas">
					<td>{{ $index + 1 }}</td>
					<td>{{ data.name }}</td>
					<td>{{ data.code }}</td>
					<td>{{ data.count }}</td>
				</tr>
			</tbody>
		</table>
	</div>

<script src="./pkgs/zepto/zepto.js"></script>
<script src="./pkgs/layer_mobile/layer.js"></script>
<script src="./pkgs/vue/vue.min.js"></script>
<script>
(function(){
	var renderDom;

	$.ajax({
		type: "get",
		url: "http://api.ch-jht.com/live/index/show",
		dataType: "json",
		success: function(results) {
			if (results.Success) {
				renderDom = new Vue({
					el: ".table",
					data: {
						datas: results.Data	
					}
				});
			} else {
				layer.open({
					content: results.Msg,
					btn: "确定"
				});
			}
		}
	});

	// $(".btn")
})();
</script>
</body>
</html>